import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/components/layout'

Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Layout,
      redirect: '/home',
      hidden: true,
      children: [
        {
          path: 'home',
          component: () => import('@/view/Home.vue'),
          meta: { title: '库存数据' }
        },
        {
          path: 'out',
          component: () => import ('@/view/daily/index.vue'),
          meta: { title: '销售出货计划' }
        },
        {
          path: 'test', 
          name: 'Test',
          component: () => import('@/view/test/index.vue'),// Fixed typo in 'component'
          meta: { title: '测试' }
          
        }
      ]
    },
   
  ]
})

export default router
